import { AppDataSource } from '../../db/index'
import { Tag } from '../../db/entities/Tag'

const tagRepository = AppDataSource.getRepository(Tag)

export default defineEventHandler(async (event) => {
  let res = await tagRepository.find()

  return {
    code: 0,
    data: res,
    message: 'success'
  }
})
